//
//  YCAlertAction.m
//  YCAlertViewDemo
//
//  Created by carpenter on 2019/11/7.
//  Copyright © 2019 carpenter. All rights reserved.
//

#import "YCAlertAction.h"

@implementation YCAlertAction

+(instancetype)actionWithTitle:(NSString *)title completionHandle:(YCAlertActionCompletionHandle)completionHandle{
    return [self actionWithTitle:title textColor:nil completionHandle:completionHandle];
}

+(instancetype)actionWithTitle:(NSString *)title textColor:(UIColor *)textColor completionHandle:(YCAlertActionCompletionHandle)completionHandle{
    
    return [[[self class] alloc] initWithTitle:title textColor:textColor textFont:nil backgroundNormalColor:nil backgroundHeightColor:nil completionHandle:completionHandle];
}


-(instancetype)initWithTitle:(NSString *)title
                   textColor:(UIColor *)textColor
                    textFont:(UIFont *)textFont
       backgroundNormalColor:(UIColor *)backgroundNormalColor
       backgroundHeightColor:(UIColor *)backgroundHeightColor
            completionHandle:(YCAlertActionCompletionHandle)completionHandle{
    
    if (self = [super init]) {
    
        self.title = title;
        self.textColor = textColor;
        self.textFont = textFont;
        self.backgroundNormalColor = backgroundNormalColor;
        self.backgroundHeightColor = backgroundHeightColor;
        self.completionHandle = completionHandle;
    }
    return self;
}
@end
